<template>
	<view class="content" style="padding: 0 40rpx;">
		<u-toast ref="uToast"></u-toast>
		<view class="header">{{list.name}}</view>
		<view class="time">{{list.create_time | newDate}}</view>
		<view class="box_redius center">
			{{list.content ? list.content : ''}}
		</view>
	</view>
</template>

<script>
	import {
		technicalById
	} from '@/api/index.js'
	export default {
		data() {
			return {
				list: {}
			}
		},
		onLoad(option) {
			this.gettechnicalById(option.id)
		},
		methods: {
			gettechnicalById(id) {
				technicalById({
					id: id
				}).then(res => {
					this.list = res.data
				}).catch(err => {
					this.$refs.uToast.show({
						message: '暂无信息，请查看其他故障',
						type: 'default',
						icon: false,
						complete: function() {
							uni.navigateBack({
								delta: 1
							});
						}
					})
				})
			}
		}
	}
</script>

<style>
	page {
		background: #FFFFFF;
	}
</style>

<style scoped lang="scss">
	.header {
		font-size: 48rpx;
		line-height: 100rpx;
		padding-top: 40rpx;
		text-align: justify;
		font-weight: 600;
		text-align: center;
	}

	.time {
		color: #666666;
		text-align: center;
	}

	.center {
		text-align: justify;
		text-indent: 2em;
		letter-spacing: 4rpx;
		line-height: 40rpx;
	}
</style>
